/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.api.wrapper.shop.previousevents;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.api.base.warpper.ApiWrapper;
import org.opsli.common.annotation.validator.Validator;
import org.opsli.common.annotation.validator.ValidatorLenMax;
import org.opsli.common.enums.ValidatorType;
import org.opsli.plugins.excel.annotation.ExcelInfo;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 往期活动 Model
 *
 * @author 17607080935
 * @date 2024-10-29 19:19:37
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ShopPreviousEventsModel extends ApiWrapper {

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @ExcelProperty(value = "标题", order = 0)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(222)
    private String title;

    /**
     * 人数
     */
    @ApiModelProperty(value = "人数")
    @ExcelProperty(value = "人数", order = 1)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(5)
    private Integer number;

    /**
     * 日期
     */
    @ApiModelProperty(value = "日期")
    @ExcelProperty(value = "日期", order = 2)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

    /**
     * 图文详情
     */
    @ApiModelProperty(value = "图文详情")
    @ExcelProperty(value = "图文详情", order = 3)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(225)
    private String json;

    private String orgIds;

    private String imgs;

}